-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start the server awareness #78
Start the server awareness #78
Conversation
Let me know if you need help with this (I see tests are failing). |
Yes, I took a look at the tests, it seems that The tests pass if we remove the error if the awareness is already started. This probably means that the awareness is not properly stopped, but I don't know how to fix it. |
@@ -231,6 +231,7 @@ async def start( | |||
self._task_group.start_soon(self._stopped.wait) | |||
self._task_group.start_soon(self._watch_ready) | |||
self._task_group.start_soon(self._broadcast_updates) | |||
self._task_group.start_soon(self.awareness.start) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need that above too, in the if from_context_manager:
branch.
pycrdt_websocket/yroom.py
Outdated
@@ -240,6 +241,7 @@ async def stop(self) -> None: | |||
if self._task_group is None: | |||
raise RuntimeError("YRoom not running") | |||
self._stopped.set() | |||
self.awareness.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.awareness.stop() | |
await self.awareness.stop() |
Co-authored-by: David Brochart <[email protected]>
Thanks @davidbrochart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brichet.
This PR start the server awareness periodic update.
It follows jupyter-server/pycrdt#178.